import request from '@/utils/request'

// 查询当前缴费信息列表
export function listAccount(query) {
  return request({
    url: '/basedata/useraccount/list',
    method: 'get',
    params: query
  })
}

// 查询当前缴费信息详细
export function getAccount(id) {
  return request({
    url: '/basedata/useraccount/' + id,
    method: 'get'
  })
}

// 新增当前缴费信息
export function addAccount(data) {
  return request({
    url: '/basedata/useraccount',
    method: 'post',
    data: data
  })
}

// 修改当前缴费信息
export function updateAccount(data) {
  return request({
    url: '/basedata/useraccount',
    method: 'put',
    data: data
  })
}

// 删除当前缴费信息
export function delAccount(id) {
  return request({
    url: '/basedata/useraccount/' + id,
    method: 'delete'
  })
}

// 查询当前缴费信息详细-指定用户编号
export function getUserInfo(userId) {
  return request({
    url: '/basedata/useraccount/getUserInfo/' + userId,
    method: 'get'
  })
}

//查询预存缴费记录-指定用户编号
export function getPrePaymentList(query) {
  return request({
    url: '/basedata/payment/getPrePaymentList',
    method: 'get',
    params: query
  })
}
//查询今日收费汇总
export function getPaySummaryToday(query) {
  return request({
    url: '/basedata/payment/getPaySummaryToday',
    method: 'get',
    params: query
  })
}

//预存缴费
export function addPrePayment(data) {
  return request({
    url: '/basedata/payment',
    method: 'post',
    data: data
  })
}

//撤销预存
export function revokedPrePayment(query) {
  return request({
    url: '/basedata/payment/revokedPrePayment',
    method: 'get',
    params: query
  })
}